package com.cloudbroker.bsc.common.search.core;

import java.util.List;
import java.util.Map;

/**
 * 搜所引擎
 *
 * @create 2016-6-11
 * @author moyin18602
 * @version
 */
public interface SearchEngineBase {
	/**
	 *
	 * @param database_name
	 * @param table_name
	 * @param row_id
	 * @param map
     * @return
     */
	public <T> boolean save(String database_name, String table_name, String row_id, T obj);

	/**
	 *
	 * @param list
	 * @param <T>
     * @return
     */
	public <T> boolean save(List<T> list);

	/**
	 *
	 * @param entity
	 * @return
     */
	public boolean save(SearchEngineEntity entity);

	/**
	 *
	 * @param database_name
	 * @param table_name
	 * @param row_id
	 * @param map
     * @return
     */
	public <T> boolean update(String database_name, String table_name, String row_id, T obj);

	/**
	 *
	 * @param entity
	 * @return
     */
	public boolean update(SearchEngineEntity entity);

	/**
	 *
	 * @param database_name
	 * @param table_name
	 * @param row_id
     * @return
     */
	public boolean delete(String database_name, String table_name, String row_id);

	/**
	 *
	 * @param entity
	 * @return
     */
	public boolean delete(SearchEngineEntity entity);

	/**
	 *
	 * @param index
	 * @param type
	 * @param searchType
	 * @param queryBuilder
	 * @param postFilter
	 * @param start
	 * @param limit
	 * @param isExplain
     * @param highLightField
	 * @param highLightField
     * @return
     */
	public <T> List<Map> query(T entity);

	public Object deleteAll();
}
